﻿Imports Mysoft.Map.Data

Partial Public Class WF_AttachMent_menu
    Inherits Mysoft.Map.Application.Security.AppPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Not Request.QueryString("FKGUID") Is Nothing Then
                rp.DataSource = MyDB.GetDataTable("SELECT DocGUID,FkGUID,CASE WHEN DATALENGTH(DocName)-LEN(DocName) > 0 THEN CASE WHEN LEN(DocName) > 26 THEN SUBSTRING(DocName, 0, 25) + '...' ELSE DocName END ELSE CASE WHEN LEN(DocName) > 50 THEN SUBSTRING(DocName, 0, 48) + '...' ELSE DocName END END DocName1,DocName,DocType,UserName,CreateOn,CreateBy,Location + FileName as FileName,LockedBy,LockedUser,ModifiedBy,case when ModifiedBy is not null then ModifiedUser else UserName end as ModifiedUser,ModifiedDateTime FROM ep_Documents WHERE FkGUID='" + Request.QueryString("FKGUID").ToString() + "' ORDER BY CreateOn DESC")
                rp.DataBind()
            End If
        End If
    End Sub
End Class